const fs = require('fs')
const path = require('path')
fs.readFile(path.join(__dirname, './files/a.txt'), 'utf8', (err, data) => {
  fs.writeFile(path.join(__dirname, './files/b.txt'), data, 'utf8', err => {
    if (err) {
      console.log('失败！')
    } else {
      console.log('成功！')
    }
  })
})